<link rel="stylesheet" href="../core/resource/weui/weui.css">
<div class="order-list-page" ng-if="pagedata.op == 'list'">
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">我的订单</div>
		<div class="fui-header-right"></div>
	</div>
	<div></div>
	<div id="tab" class="fui-tab fui-tab-danger">
        <a ng-class="{'external active':pagedata.status == 10}" href="javascript:" ng-click="access_json('list','status=10')">全部</a>
        <a ng-class="{'external active':pagedata.status == 0}" href="javascript:" ng-click="access_json('list','status=0')">待消费</a>
        <a ng-class="{'external active':pagedata.status == 1}" href="javascript:" ng-click="access_json('list','status=1')">服务中</a>
        <a ng-class="{'external active':pagedata.status == 2}" href="javascript:" ng-click="access_json('list','status=2')">已完成</a>
        <a ng-class="{'external active':pagedata.status == 3}" href="javascript:" ng-click="access_json('list','status=3')">已取消</a>
    </div>
	<div class='fui-content navbar order-list' style="margin-top:0.2rem">
	<div class="fui-list-group order-item" ng-repeat="item in pagedata.order_list">
                <a class="fui-list external" style="padding: 0.42rem 0.5rem" data-nocache="true">
                    <div class="fui-list-inner">
                        <div class="subtitle"> 排队号: {{item.number}}</div>
                    </div>
                    <div ng-show="item.status==0" class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">待消费</div>
                    <div ng-show="item.status==1" class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">服务中</div>
                    <div ng-show="item.status==2" class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">已完成</div>
                    <div ng-show="item.status==3" class="row-remark text-cancel" style="width: 4rem; font-size: 0.65rem;text-align: right;">已取消</div>
                    <div class="angle"></div>
                </a> 
                    <a href="" data-nocache="true">
                        <div class="fui-list-group-title lineblock">
                            <i class="icon jinyunicon icon-dianpu"></i> {{item.store_title}}
                            <span class="status noremark" style="font-size:0.50rem">{{pagedata.pluginset.workertitle}}：<span style="color:#f60;">{{item.worker.name}}</span></span>
                        </div>
                    </a>
                    <a href="" class="external" data-nocache="true">
                        <div class="fui-list goods-list">
                            <div class="fui-list-media" style="">
                                <img class="" ng-src="{{tomedia(item.store_image) || '../core/resource/images/nopic.jpg'}}">
                            </div>
                            <div class="fui-list-inner">
                                <div class="text goodstitle towline">{{item.service}}</div>
								<div class="text" style="color:#f60;font-size:0.50rem"></div>
								<div ng-show="item.status==0" class="text" style="color:#f60;font-size:0.50rem">前面还有：{{item.paidui}}</div>
                            </div>
                            <div class="fui-list-angle" style="width:4rem">
                                ￥<span class="marketprice">{{item.money}}</span></div>
                        </div>
                    </a>
                <div class="fui-list-group-title lineblock">
					<span style="color:#999;font-size:0.55rem"><i class="icon jinyunicon icon-shijian" style="color:#f60;font-size:0.50rem"></i> {{item.createtime}}</span>
                    <span class="status noremark">共 <span>1</span> 个服务 实付: <span class="text-danger">￥{{item.pay}}</span></span>
                </div>
            <div class="fui-list-group-title lineblock opblock">
				<span class="status noremark">
					<div ng-show="item.status == 3" class="btn btn-sm btn-default-o order-delete" href="javascript:" ng-click="post({},'del','id='+item.id)">删除订单</div>
					<div ng-show="item.status == 1" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'pay','id='+item.id)">支付订单</div>
					<div ng-show="item.status == 0" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'cancel','id='+item.id)">取消订单</div>
					<div ng-show="item.status == 12" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="post({},'receive','id='+item.id)">确认服务</div>
					<div ng-show="item.status == 2" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="pagedata.post.id=item.id" onclick="$('#showremark').modal();" data-nocache="true">添加评论</div>
					<div ng-show="item.status == 2" class="btn btn-sm btn-danger-o order-finish" href="javascript:" ng-click="pagedata.post.id=item.id" onclick="$('#old').modal();" data-nocache="true">添加历史{{pagedata.pluginset.faxing}}</div>
				</span>
            </div>
        </div>
	</div>
	<div class="content-empty" ng-show="pagedata.order_list.length == 0 ">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">您暂时没有订单！</p>
	</div>
</div>
<div class="order-list-page" ng-if="pagedata.op == 'comment'">
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">添加评价</div>
		<div class="fui-header-right"></div>
	</div>
	
</div>

<div class="order-list-page" ng-if="pagedata.op == 'detail'">
    <div class="fui-header">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">订单详情</div>
		<div class="fui-header-right"></div>
	</div>
	<div class='fui-content member-page navbar'>
		<div class="fui-list-group merchgroup">
			<div class="fui-list jump">
                <a class="fui-list-media">
                    <img class="round" src="{{tomedia(pagedata.member.avatar) || '../core/resource/images/nopic.jpg'}}" />
                </a>
                <div class="fui-list-inner">
                    <div class="title">{{pagedata.user.name || '匿名用户'}}</div>
					<div class="title" style="font-size:0.65rem">昵称：{{pagedata.member.nickname}}</div>
					<div class="title" style="font-size:0.65rem">手机号：{{pagedata.user.mobile}}</div>
                </div>
                <a class="jump" href="javascript:;">
					
				</a>
            </div>
		</div>
		<div class="weui_cells">
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>服务项目</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.serve_title">{{pagedata.serve.title}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>服务套餐</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.package_title">{{pagedata.order.package.package_title}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>订单时间</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.time">{{pagedata.order.day}}--{{pagedata.order.serve_time.times.start}}--{{pagedata.order.serve_time.times.end}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>服务地址</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.address">{{pagedata.order.address}}</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>服务费用</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.package_price">{{pagedata.order.package.package_price}}元</div>
			</div>
			<div class="weui_cell">
					<div class="weui_cell_bd weui_cell_primary">
						<span>实际支付</span>
					</div>
					<div class="weui_cell_ft" ng-model="pagedata.post.package_price">{{pagedata.order.pay}}元</div>
			</div>
		</div>
	</div>
</div>
<div id="showqr"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
		<div class="modal-dialog"  style="width:100%">
			<div class="modal-content">
			<div class="weui_cells weui_cells_form">
			 <div class="weui_cell">
                <div class="weui_cell_hd"><label class="weui_label">评价</label></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <input class="weui_input" type="number" ng-model="pagedata.post.comment" placeholder="输入评价内容">
                </div>
            </div>
			</div>
			<div class="weui_cells weui_cells_form">
			<div class="weui_cell">
					<div class="weui_cell_hd"><label class="weui_label">添加图片</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<ul class="weui_uploader_files" ng-if="pagedata.post.image">
							  <li class="weui_uploader_file" style="background-image:url({{tomedia(pagedata.post.image)}})"></li>
						</ul>
						<div class="weui_uploader_input_wrp">
							 <input class="weui_uploader_input" ng-click="up_file(pagedata.post,'image','image')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple="">
						</div>
					</div>
			</div>
			</div>
		<div class="weui_btn_area">
			 <a class="weui_btn weui_btn_primary" href="javascript:"  ng-click="post(pagedata.post,'comment','id='+pagedata.post.id)">提交</a>
		</div>
			</div>
		</div>
</div>
<div id="showremark" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">评价</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info c000">
						<textarea rows="5" placeholder="50字以内（选填）" ng-model="pagedata.post.comment"></textarea>
					</div>
				</div>
			</div>
				<div class="weui_cells_title">图片</div>
	<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <div class="weui_uploader">
                        <div class="weui_uploader_bd">
                            <ul class="weui_uploader_files">
                                <li ng-repeat="p in pagedata.post.images" class="weui_uploader_file" style="background-image:url('{{tomedia(p)}}')">
									<div class="upbtn" >
										<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index-1,0,p);pagedata.post.opus_images.splice($index+1,1)">上移</a>
										<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index,1)">删除</a>
									</div>
								</li>
                            </ul>
                            <div class="weui_uploader_input_wrp" href="javascript:;" ng-click="images(pagedata.post,'images')"></div>
                        </div>
                    </div>
                </div>
            </div>
    </div>
			<div class="fui-navbar">
				<a aria-hidden="true" data-dismiss="modal" ng-click="post(pagedata.post,'comment','id='+pagedata.post.id)" class="nav-item btn btn-success confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>

<div id="old" class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">历史{{pagedata.pluginset.faxing}}</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info c000">
						<textarea rows="5" placeholder="50字以内（选填）" ng-model="pagedata.post.msg"></textarea>
					</div>
				</div>
			</div>
				<div class="weui_cells_title">{{pagedata.pluginset.faxing}}图片</div>
	<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <div class="weui_uploader">
                        <div class="weui_uploader_bd">
                            <ul class="weui_uploader_files">
                                <li ng-repeat="p in pagedata.post.images" class="weui_uploader_file" style="background-image:url('{{tomedia(p)}}')">
									<div class="upbtn" >
										<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index-1,0,p);pagedata.post.opus_images.splice($index+1,1)">上移</a>
										<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index,1)">删除</a>
									</div>
								</li>
                            </ul>
                            <div class="weui_uploader_input_wrp" href="javascript:;" ng-click="images(pagedata.post,'images')"></div>
                        </div>
                    </div>
                </div>
            </div>
    </div>
			<div class="fui-navbar">
				<a aria-hidden="true" data-dismiss="modal" ng-click="post(pagedata.post,'old','id='+pagedata.post.id)" class="nav-item btn btn-success confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script type="text/javascript">
	//scope.pagedata.status = -1;  //状态标记
</script>